<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>荐谱后台</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/css.css">
<link rel="stylesheet" href="../../css/AccountUser.css">
<link rel="stylesheet" href="../../../bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../bower_components/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../../../bower_components/Ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="../../../dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="../../../dist/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="../../../bower_components/jvectormap/jquery-jvectormap.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap-daterangepicker/daterangepicker.css">
<link rel="stylesheet" href="../../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
<style>
  .duotu_imgfile2 textarea{ display:none !important;}
  .duotu_imgfile2 .ydy{width:105px; display: block; float: left;}
</style>
</head>
<body class="hold-transition skin-blue sidebar-mini"  data-treeview="2" data-treeview-menu="0">
<div class="wrapper">
  <header class="main-header"> <a class="logo"> <span class="logo-mini"><b>荐谱</b></span> <span class="logo-lg">荐谱后台</span></a>
    <nav class="navbar navbar-static-top"><a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button"></a></nav>
  </header>
  <aside class="main-sidebar">
    <section class="sidebar">
      <ul class="sidebar-menu" data-widget="tree">
        <li class="treeview"> <a> <i class="fa fa-user"></i> <span>用户管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i> </span> </a>
          <ul class="treeview-menu">
          </ul>
        </li>
        <li class="treeview"> <a> <i class="fa  fa-comments"></i> <span>评论管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i> </span> </a>
          <ul class="treeview-menu">
          </ul>
        </li>
        <li class="treeview"> <a> <i class="fa fa-coffee"></i> <span>推文心得</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i> </span> </a>
          <ul class="treeview-menu">
          </ul>
        </li>
      </ul>
    </section>
  </aside>
  <div class="content-wrapper">

      <section class="content-search">
          <div class="form-group">
              <select class="form-control w140" id="cx_order">
                  <option value="">排序</option>
                  <option value="0">最新</option>
                  <option value="1">热门</option>
              </select>

              <select class="form-control w140" id="cx_type">
                  <option value="0">荐文</option>
                  <option value="1">心得</option>
              </select>
            
            <input type="text" class="form-control w250" placeholder="某荐文下的心得(荐文ID)" id="cx_father_id">
            <input type="text" class="form-control w250" placeholder="某人写的心得或者荐文(用户ID)" id="cx_user_id">
          </div>
          <div class="form-group">
            <button type="button" class="btn btn-primary searchbtn">搜索</button>
            <button type="button" class="btn btn-primary addupdate" data-toggle="modal" data-target="#modal-addupdate" >新增推文</button>
          </div>
        </section>
      
 
    <!-- 新建修改窗口 -->
    <div class="modal fade" id="modal-addupdate" >
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">新增</h4>
          </div>
          <div class="modal-body">
            <div class="box box-primary">
              <div class="box-body">
                <div class="form-group">
                  <input type="hidden" id="id"/>
                  <label>标题</label>
                  <input type="text" class="form-control w450" placeholder="请输入标题" id="xz_post_name">
                </div>
                <div class="form-group">
                  <label>推荐理由</label>
                  <input type="text" class="form-control w450" placeholder="请输入推荐理由" id="xz_reason">
                </div>


                <div class="form-group">
                    <label>文化/故事</label>


                    <div class="dtbox">
                      <input id="duotu1" type="file" name="myfile" style="display:none" multiple="multiple">
                      <input id="duotu_input1" class="form-control hide tp_zong" type="hide">
                      <a class="btn upload" onclick="$('input[id=duotu1]').click();">选择文件<i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                      <div class="duotu_imgfile1 duotu_imgfile0">
                      </div>
                      
                    </div>
                </div>


                  <div class="form-group">
                      <label>环境图文</label>
                      

                      <div class="dtbox">
                        <input id="duotu2" type="file" name="myfile" style="display:none" multiple="multiple">
                        <input id="duotu_input2" class="form-control hide tp_zong" type="hide">
                        <a class="btn upload" onclick="$('input[id=duotu2]').click();">选择文件<i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                        <div class="duotu_imgfile2 duotu_imgfile0">
                        </div>
                        
                      </div>
                  </div>

                    <div class="form-group">
                        <label>必点图文</label>

                        <div class="dtbox">
                          <input id="duotu3" type="file" name="myfile" style="display:none" multiple="multiple">
                          <input id="duotu_input3" class="form-control hide tp_zong" type="hide">
                          <a class="btn upload" onclick="$('input[id=duotu3]').click();">选择文件<i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                          <div class="duotu_imgfile3 duotu_imgfile0">
                          </div>
                        </div>
                    </div>


                      <div class="form-group">
                          
                          <label>产品标签</label>
                          <input type="text" class="form-control w450" placeholder="请输入产品标签" id="xz_title">
                        </div>

                        <div class="form-group">
                            
                            <label>执货照</label>

                            <input id="bt_picture_product" type="file" name="myfile" style="display:none">
                            <input id="xz_picture_product" class="form-control w180" type="text">
                            <a class="btn upload" onclick="$('input[id=bt_picture_product]').click();">选择文件 <i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                            <div class="addimgbox img_picture_product"></div>


                          </div>


                          <div class="form-group">
                              
                              <label>首图</label>

                              <input id="bt_picture_banner" type="file" name="myfile" style="display:none">
                              <input id="xz_picture_banner" class="form-control w180" type="text">
                              <a class="btn upload" onclick="$('input[id=bt_picture_banner]').click();">选择文件 <i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                              <div class="addimgbox img_picture_banner"></div>

                            </div>


                            <div class="form-group">
                                
                                <label>适应人群</label>
                                <input type="text" class="form-control w450" placeholder="请输入适应人群" id="xz_adapt_to">
                              </div>

                              <div class="form-group">
                                  
                                  <label>产品禁忌</label>
                                  <input type="text" class="form-control w450" placeholder="请输入产品禁忌" id="xz_attention">
                                </div>
                                <div class="form-group">
                                    
                                    <label>优势区位</label>
                                    <input type="text" class="form-control w450" placeholder="请输入优势区位" id="xz_area">
                                  </div>
                                  <div class="form-group">
                                      
                                      <label>体验地址/推荐位置</label>
                                      <input type="text" class="form-control w450" placeholder="请输入标题" id="xz_experience_address">
                                    </div>
                                    <div class="form-group">
                                        
                                        <label>阅读量</label>
                                        <input type="text" class="form-control w450" placeholder="请输入阅读量" id="xz_read_count">
                                      </div>
                                      <div class="form-group">
                                          
                                          <label>收藏量</label>
                                          <input type="text" class="form-control w450" placeholder="请输入收藏量" id="xz_favorite_count">
                                        </div>

                                        <div class="form-group">
                                          <label>投诉量</label>
                                          <input type="text" class="form-control w450" placeholder="请输入投诉量" id="xz_complain_count">
                                        </div>


                                        <div class="form-group">
                                            
                                            <label>评论数</label>
                                            <input type="text" class="form-control w450" placeholder="请输入评论数" id="xz_reply_count">
                                          </div>
                                          <div class="form-group">
                                              
                                              <label>发布人id</label>
                                              <input type="text" class="form-control w450" placeholder="请输入发布人id" id="xz_user_id">
                                            </div>
                                           
                <!-- <div class="form-group">
                  <label>联系方式</label>
                  <input type="text" class="form-control w450" placeholder="请输入联系方式" id="phone">
                </div>
                <div class="form-group">
                  <label>企业简介</label>
                  <textarea class="form-control w450" rows="5" id="companyProfile" placeholder="请输入企业简介"></textarea>
                </div>
                <div class="form-group">
                  <label>企业图片</label>
                  <input id="lefile1" type="file" name="myfile" style="display:none">
                  <input id="photoCover1" class="form-control w180" type="text">
                  <a class="btn upload" onclick="$('input[id=lefile1]').click();">选择文件 <i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                  <div class="imgfile1"></div>
                </div>
                <div class="form-group">
                  <label>企业评分</label>
                  <input type="text" class="form-control w450" placeholder="请输入企业评分" id="score">
                </div>
                <div class="form-group">
                  <label>是否推荐</label>
                  <select class="form-control w450" id="isRecommend">
                    <option value="2">否</option>
                    <option value="1">是</option>
                  </select>
                </div>
                <div class="form-group">
                  <label>排序等级</label>
                  <select class="form-control w180" id="orderLevel">
                    <option value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                  </select>（数值越大排序靠前）
                </div> -->
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnaddupdate">提交</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 删除窗口 -->
    <div class="modal fade" id="modal-delete" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">确认</h4>
          </div>
          <div class="modal-body">确认删除该数据吗？</div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btndelete">确认</button>
          </div>
        </div>
      </div>
    </div>

    <!-- 新建修改产品窗口 -->
    <div class="modal fade" id="modal-addupdatepro">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">新增</h4>
          </div>
          <div class="modal-body">
            <div class="box box-primary">
              <div class="box-body">
                <input type="hidden" id="xd_id"/>
                <input type="hidden" id="xd_fid"/>

                <div class="form-group">
                  <label>标题</label>
                  <input type="text" class="form-control w450" placeholder="请输入标题" id="xd_post_name">
                </div>

                <div class="form-group">
                  <label>体验地址</label>
                  <input type="text" class="form-control w450" placeholder="请输入体验地址" id="xd_experience_address">
                </div>

                <div class="form-group">
                  <label>推荐理由</label>
                  <input type="text" class="form-control w450" placeholder="请输入推荐理由" id="xd_reason">
                </div>


                <div class="form-group">
                    <label>文化/故事</label>
                    <!-- <input type="text" class="form-control w450" placeholder="请输入文化/故事" id="xd_introduction"> -->

                    <div class="dtbox">
                      <input id="duotu4" type="file" name="myfile" style="display:none" multiple="multiple">
                      <input id="duotu_input4" class="form-control hide tp_zong" type="hide">
                      <a class="btn upload" onclick="$('input[id=duotu4]').click();">选择文件<i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                      <div class="duotu_imgfile4 duotu_imgfile0">
                      </div>
                      
                    </div>
                </div>

                <div class="form-group">
                              
                  <label>封面图</label>

                  <input id="bt_picture_banner2" type="file" name="myfile" style="display:none">
                  <input id="xz_picture_banner2" class="form-control w180" type="text">
                  <a class="btn upload" onclick="$('input[id=bt_picture_banner2]').click();">选择文件 <i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                  <div class="addimgbox img_picture_banner2"></div>

                </div>

                <div class="form-group">                       
                  <label>荐文id</label>
                  <input type="text" class="form-control w450" placeholder="请输入荐文id" id="xd_father_id">
                </div>

                <div class="form-group">                       
                  <label>作者id</label>
                  <input type="text" class="form-control w450" placeholder="请输入作者id" id="xd_user_id">
                </div>

                <div class="form-group">
                                        
                    <label>阅读量</label>
                    <input type="text" class="form-control w450" placeholder="请输入阅读量" id="xd_read_count">
                  </div>
                  <div class="form-group">
                      
                      <label>收藏量</label>
                      <input type="text" class="form-control w450" placeholder="请输入收藏量" id="xd_favorite_count">
                    </div>
                    <div class="form-group">
                        
                        <label>投诉量</label>
                        <input type="text" class="form-control w450" placeholder="请输入投诉量" id="xd_complain_count">
                      </div>
                    <div class="form-group">
                        
                        <label>评论数</label>
                        <input type="text" class="form-control w450" placeholder="请输入评论数" id="xd_reply_count">
                      </div>
                
               
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnaddupdatepro">提交</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 删除窗口 -->
    <div class="modal fade" id="modal-deletepro" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">确认</h4>
          </div>
          <div class="modal-body">确认删除该数据吗？</div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btndeletepro">确认</button>
          </div>
        </div>
      </div>
    </div>
    <section class="content">
      <div class="box">
        <div class="box-header">
          <h3 class="box-title">申报企业列表</h3>
        </div>
        <div class="box-body">
          <table id="example1" class="table table-bordered table-striped">
          </table>
          <div class="paginationDiv">
            <ul class="pagination">
              <li class="prev"><a>上一页</a></li>
              <li class="next"><a>下一页</a></li>
            </ul>
            <input type="text" value="1" class="form-control curpage"/>
            <button type="button" class="btn btn-default gopage">跳转</button>
            <span class="pageinfo"></span> </div>
        </div>
      </div>
    </section>
  </div>
</div>
<script type="text/html" id="datalist">
	<thead>
	  <tr role="row">
		<th>ID</th>
		<th>标题</th>
		<th>发布人id</th>
		<th>推荐种类</th>
		<th>推荐理由</th>
    <!-- <th>文化/故事</th>
    <th>环境图文</th>
    <th>必点图文</th> -->
    <th>产品标签</th>
    <th>执货照</th>
    <th>封面图</th>
    <th>适应人群</th>
    <th>产品禁忌</th>
    <th>优势区位</th>
    <th>体验地址/推荐位置</th>
    <th>联系方式</th>
    <th>阅读量</th>
    <th>收藏量</th>
    <th>投诉量</th>
    <th>评论数</th>
		<th>操作</th>
	  </tr>
    </thead>
	<tbody>
	<%for(var i = 0,len= dataset.length;i < len;i++){%>
	  <tr role="row">
		<td><%= dataset[i].id%></td>
    <td><%= dataset[i].post_name%></td>
    <td><%= dataset[i].user_id%></td>
    <td><%= dataset[i].type==1||dataset[i].type=="1"?"心得":"荐文"%></td>
    <td style="max-width:100px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;"><%= dataset[i].reason%></td>
    <!-- <td><%= dataset[i].introduction%></td>
    <td><%= dataset[i].environment%></td>
    <td><%= dataset[i].goods%></td> -->
    <td><%= dataset[i].title%></td>
    <td><%if (dataset[i].picture_product==null||dataset[i].picture_product=="undefined"){ %>
      -<%} else {%>
        <a target="_blank" href=<%= dataset[i].picture_product%>>
        <img style="width:20px; height:20px; cursor: pointer;"  src=<%= dataset[i].picture_product%>>
        </a>
      <%}%></td>

    <td><%if (dataset[i].picture_banner==""||dataset[i].picture_banner=="undefined"){ %>
        -<%} else {%>
          <a target="_blank" href=<%= dataset[i].picture_banner%>>
          <img style="width:20px; height:20px; cursor: pointer;"  src=<%= dataset[i].picture_banner%>>
          </a>
        <%}%></td>
    <td><%= dataset[i].adapt_to%></td>
    <td><%= dataset[i].attention%></td>
    <td><%= dataset[i].area%></td>
    <td><%= dataset[i].experience_address%></td>
    <td><%= dataset[i].phone%></td>
    <td><%= dataset[i].read_count%></td>
    <td><%= dataset[i].favorite_count%></td>
    <td><%= dataset[i].complain_count%></td>
    <td><%= dataset[i].reply_count%></td>
		<td>

      <%if (dataset[i].type==1||dataset[i].type=="1"){ %>
        <button type="button" class="btn btn-info btn-xs addupdatepro" data-toggle="modal" data-target="#modal-addupdatepro" data-id="<%= dataset[i].id%>">编辑</button>
        <%} else {%>
          <button type="button" class="btn btn-info btn-xs addupdate" data-toggle="modal" data-target="#modal-addupdate"  data-id="<%= dataset[i].id%>">编辑</button>
          <button type="button" class="btn btn-info btn-xs addupdatepro" data-toggle="modal" data-target="#modal-addupdatepro" data-fid="<%= dataset[i].id%>">新增心得</button>
      <%}%>

      <button type="button" class="btn btn-info btn-xs delete" data-toggle="modal" data-target="#modal-delete"  data-id="<%= dataset[i].id%>">删除</button>
    </td>
   


      
      </tr>
	<%}%>
    </tbody>
</script> 
<script type="text/html" id="datalist2">

</script> 
<script src="../../../bower_components/jquery/dist/jquery.min.js"></script> 
<script src="../../../bower_components/jquery-ui/jquery-ui.min.js"></script> 
<script src="../../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> 
<script src="../../../bower_components/raphael/raphael.min.js"></script> 
<script src="../../../bower_components/jquery-sparkline/dist/jquery.sparkline.min.js"></script> 
<script src="../../../plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script> 
<script src="../../../plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script> 
<script src="../../../bower_components/jquery-knob/dist/jquery.knob.min.js"></script> 
<script src="../../../bower_components/moment/min/moment.min.js"></script> 
<script src="../../../bower_components/bootstrap-daterangepicker/daterangepicker.js"></script> 
<script src="../../../bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script> 
<script src="../../../bower_components/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-CN.min.js"></script> 
<script src="../../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script> 
<script src="../../../bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script> 
<script src="../../../bower_components/fastclick/lib/fastclick.js"></script> 
<script src="../../../dist/js/adminlte.min.js"></script> 
<script src="../../js/template-web.js"></script> 
<script src="../../js/js.js"></script> 
<script src="../../js/tuiwen.js"></script>
</body>
</html>
